package com.example.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.CommentLike;
import com.example.entity.Evaluations;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

// 评论点赞Mapper
public interface CommentLikeMapper extends BaseMapper<CommentLike> {
    // 检查用户是否已点赞
    @Select("SELECT COUNT(1) FROM comment_like WHERE comment_id = #{commentId} AND user_id = #{userId}")
    int checkLiked(@Param("commentId") Integer commentId, @Param("userId") Integer userId);
}

